package com.hanamaki.oop.demo02;

public class Customer {
    String name;
    int pass;
    String type;
    int score;
    int fk;
    public Customer(){

    }
    public Customer(String name,int pass,String type,int score){
        this.name=name;
        this.pass=pass;
        this.type=type;
        this.score=score;
        if (type.equals("金卡")){
            if (score>1000){
                this.fk=500;
            }
        }else if (type.equals("普卡")){
            if (score>5000){
                this.fk=500;
            }
        }else{
            this.fk=0;
        }
    }

    @Override
    public String toString() {
        return "Customer{" +
                "name='" + name + '\'' +
                ", pass=" + pass +
                ", type='" + type + '\'' +
                ", score=" + score +
                ", fk=" + fk +
                '}';
    }
}
